home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / idl / nsIAccessible.idl < prev    next >
Text File  |  2006-05-08  |  28KB  |  625 lines

  1. /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
  2. /* ***** BEGIN LICENSE BLOCK *****
  3.  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
  4.  *
  5.  * The contents of this file are subject to the Mozilla Public License Version
  6.  * 1.1 (the "License"); you may not use this file except in compliance with
  7.  * the License. You may obtain a copy of the License at
  8.  * http://www.mozilla.org/MPL/
  9.  *
  10.  * Software distributed under the License is distributed on an "AS IS" basis,
  11.  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
  12.  * for the specific language governing rights and limitations under the
  13.  * License.
  14.  *
  15.  * The Original Code is mozilla.org code.
  16.  *
  17.  * The Initial Developer of the Original Code is
  18.  * Netscape Communications Corporation.
  19.  * Portions created by the Initial Developer are Copyright (C) 2003
  20.  * the Initial Developer. All Rights Reserved.
  21.  *
  22.  * Original Author: Eric D Vaughan (evaughan@netscape.com)
  23.  * Contributor(s): Aaron Leventhal (aaronl@netscape.com)
  24.  *                 John Gaunt (jgaunt@netscape.com)
  25.  *                 Kyle Yuan (kyle.yuan@sun.com)
  26.  *
  27.  * Alternatively, the contents of this file may be used under the terms of
  28.  * either the GNU General Public License Version 2 or later (the "GPL"), or
  29.  * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
  30.  * in which case the provisions of the GPL or the LGPL are applicable instead
  31.  * of those above. If you wish to allow use of your version of this file only
  32.  * under the terms of either the GPL or the LGPL, and not to allow others to
  33.  * use your version of this file under the terms of the MPL, indicate your
  34.  * decision by deleting the provisions above and replace them with the notice
  35.  * and other provisions required by the GPL or the LGPL. If you do not delete
  36.  * the provisions above, a recipient may use your version of this file under
  37.  * the terms of any one of the MPL, the GPL or the LGPL.
  38.  *
  39.  * ***** END LICENSE BLOCK ***** */
  40.  
  41. #include "nsISupports.idl"
  42.  
  43. /**
  44.  * A cross-platform interface that supports platform-specific 
  45.  * accessibility APIs like MSAA and ATK. Contains the sum of what's needed
  46.  * to support IAccessible as well as ATK's generic accessibility objects.
  47.  * Can also be used by in-process accessibility clients to get information
  48.  * about objects in the accessible tree. The accessible tree is a subset of 
  49.  * nodes in the DOM tree -- such as documents, focusable elements and text.
  50.  * Mozilla creates the implementations of nsIAccessible on demand.
  51.  * See http://www.mozilla.org/projects/ui/accessibility for more information.
  52.  *
  53.  * @status UNDER_REVIEW
  54.  */
  55. [scriptable, uuid(DB717DB4-37E9-42F1-A3B0-2579DD7C3814)]
  56. interface nsIAccessible : nsISupports
  57. {
  58.   /**
  59.    * Parent node in accessible tree.
  60.    */
  61.   readonly attribute nsIAccessible parent;
  62.  
  63.   /**
  64.    * Next sibling in accessible tree
  65.    */
  66.   readonly attribute nsIAccessible nextSibling;
  67.  
  68.   /**
  69.    * Previous sibling in accessible tree
  70.    */
  71.   readonly attribute nsIAccessible previousSibling;
  72.  
  73.   /**
  74.    * First child in accessible tree
  75.    */
  76.   readonly attribute nsIAccessible firstChild;
  77.  
  78.   /**
  79.    * Last child in accessible tree
  80.    */
  81.   readonly attribute nsIAccessible lastChild;
  82.  
  83.   /**
  84.    * Number of accessible children
  85.    */
  86.   readonly attribute long childCount;
  87.  
  88.   /**
  89.    * The 0-based index of this accessible in its parent's list of children,
  90.    * or -1 if this accessible does not have a parent.
  91.    */
  92.   readonly attribute long indexInParent;
  93.  
  94.   /**
  95.    * Accessible name -- the main text equivalent for this node
  96.    */
  97.   attribute AString name;
  98.  
  99.   /**
  100.    * Accessible value -- a number or a secondary text equivalent for this node
  101.    * Widgets that use xhtml2:role can force a value using the valuenow attribute
  102.    */
  103.   readonly attribute AString finalValue;
  104.  
  105.   /**
  106.    * Accessible description -- long text associated with this node
  107.    */
  108.   readonly attribute AString description;
  109.  
  110.   /**
  111.    * Provides localized string of accesskey name, such as Alt+D.
  112.    * The modifier may be affected by user and platform preferences.
  113.    * Usually alt+letter, or just the letter alone for menu items. 
  114.    */
  115.   readonly attribute AString keyboardShortcut;
  116.  
  117.   /**
  118.    * Provides localized string of global keyboard accelerator, such
  119.    * as Ctrl+O for Open file
  120.    */
  121.   readonly attribute AString keyBinding;
  122.  
  123.   /**
  124.    * Natural enumerated accessible role for the associated element.
  125.    * The values depend on platform because of variations.
  126.    * See the ROLE_* constants defined later in this file.
  127.    * This does not take into account xhtml2:role as the finalRole does.
  128.    */
  129.   readonly attribute unsigned long role;
  130.  
  131.   /**
  132.    * Enumerated accessible role. The values depend on platform because of variations.
  133.    * See the ROLE_* constants defined later in this file.
  134.    * Widgets can use xhtml2:role to force the final role
  135.    */
  136.   readonly attribute unsigned long finalRole;
  137.  
  138.   /**
  139.    * Accessible states -- bit field which describes boolean properties of node. 
  140.    * See the STATE_* constants defined later in this file.
  141.    * Widgets that use xhtml2:role can force the state using the attributes
  142.    * disabled, etc.
  143.    */
  144.   readonly attribute unsigned long finalState;
  145.  
  146.   /**
  147.    * Extended accessible states -- second bit field describing node
  148.    */
  149.   readonly attribute unsigned long extState;
  150.  
  151.   /**
  152.    * Help text associated with node
  153.    */
  154.   readonly attribute AString help;
  155.  
  156.   /**
  157.    * Focused accessible child of node
  158.    */
  159.   readonly attribute nsIAccessible focusedChild;
  160.  
  161.   /**
  162.    * Accessible child which contains the coordinate at x,y
  163.    */
  164.   nsIAccessible getChildAtPoint(in long x, in long y);
  165.  
  166.   /**
  167.    * Nth accessible child using zero-based index or last child if index less than zero
  168.    */
  169.   nsIAccessible getChildAt(in long aChildIndex);
  170.  
  171.   /**
  172.    * Accessible node geometrically to the right of this one
  173.    */
  174.   nsIAccessible getAccessibleToRight();
  175.  
  176.   /**
  177.    * Accessible node geometrically to the left of this one
  178.    */
  179.   nsIAccessible getAccessibleToLeft();
  180.  
  181.   /**
  182.    * Accessible node geometrically above this one
  183.    */
  184.   nsIAccessible getAccessibleAbove();
  185.  
  186.   /**
  187.    * Accessible node geometrically below this one
  188.    */
  189.   nsIAccessible getAccessibleBelow();
  190.  
  191.   /**
  192.    * Accessible node related to this one 
  193.    */
  194.   nsIAccessible getAccessibleRelated(in unsigned long aRelationType);
  195.  
  196.   void getBounds(out long x, 
  197.                     out long y, 
  198.                     out long width, 
  199.                     out long height);
  200.  
  201.   /**
  202.    * Add this accessible to the current selection
  203.    */
  204.   void addSelection();
  205.  
  206.   /**
  207.    * Remove this accessible from the current selection
  208.    */
  209.   void removeSelection();
  210.  
  211.   /**
  212.    * Extend the current selection from its current accessible anchor node
  213.    * to this accessible
  214.    */
  215.   void extendSelection();
  216.  
  217.   /**
  218.    * Select this accessible node only
  219.    */
  220.   void takeSelection();
  221.  
  222.   /**
  223.    * Focus this accessible node,
  224.    * The state STATE_FOCUSABLE indicates whether this node is normally focusable.
  225.    * It is the callers responsibility to determine whether this node is focusable.
  226.    * accTakeFocus on a node that is not normally focusable (such as a table),
  227.    * will still set focus on that node, although normally that will not be visually 
  228.    * indicated in most style sheets.
  229.    */
  230.   void takeFocus();
  231.  
  232.   /**
  233.    * The number of accessible actions associated with this accessible
  234.    */
  235.   readonly attribute PRUint8 numActions;
  236.  
  237.   /**
  238.    * The name of the accessible action at the given zero-based index
  239.    */
  240.   AString getActionName(in PRUint8 index);
  241.  
  242.   /**
  243.    * Perform the accessible action at the given zero-based index
  244.    * Action number 0 is the default action
  245.    */
  246.   void doAction(in PRUint8 index);   
  247.  
  248.   /**
  249.    * Get a pointer to accessibility interface for this node, which is specific 
  250.    * to the OS/accessibility toolkit we're running on.
  251.    */
  252.   [noscript] void getNativeInterface(out voidPtr aOutAccessible);
  253.  
  254.   /**
  255.    * MSAA State flags - used for bitfield. More than 1 allowed.
  256.    */
  257.   const unsigned long  STATE_UNAVAILABLE        = 0x00000001;  // Disabled, maps to opposite of Java ENABLED, Gnome/ATK SENSITIVE?
  258.   const unsigned long  STATE_SELECTED           = 0x00000002;
  259.   const unsigned long  STATE_FOCUSED            = 0x00000004;
  260.   const unsigned long  STATE_PRESSED            = 0x00000008;
  261.   const unsigned long  STATE_CHECKED            = 0x00000010;
  262.   const unsigned long  STATE_MIXED              = 0x00000020; // 3-state checkbox or toolbar button
  263.   const unsigned long  STATE_READONLY           = 0x00000040; // Maps to opposite of Java/Gnome/ATK EDITABLE state
  264.   const unsigned long  STATE_HOTTRACKED         = 0x00000080;
  265.   const unsigned long  STATE_DEFAULT            = 0x00000100;
  266.   const unsigned long  STATE_EXPANDED           = 0x00000200;
  267.   const unsigned long  STATE_COLLAPSED          = 0x00000400;
  268.   const unsigned long  STATE_BUSY               = 0x00000800;
  269.   const unsigned long  STATE_FLOATING           = 0x00001000;  // Children "owned" not "contained" by parent
  270.   const unsigned long  STATE_MARQUEED           = 0x00002000;
  271.   const unsigned long  STATE_ANIMATED           = 0x00004000;
  272.   const unsigned long  STATE_INVISIBLE          = 0x00008000;
  273.   const unsigned long  STATE_OFFSCREEN          = 0x00010000;
  274.   const unsigned long  STATE_SIZEABLE           = 0x00020000;
  275.   const unsigned long  STATE_MOVEABLE           = 0x00040000;
  276.   const unsigned long  STATE_SELFVOICING        = 0x00080000;
  277.   const unsigned long  STATE_FOCUSABLE          = 0x00100000;
  278.   const unsigned long  STATE_SELECTABLE         = 0x00200000;
  279.   const unsigned long  STATE_LINKED             = 0x00400000;
  280.   const unsigned long  STATE_TRAVERSED          = 0x00800000;
  281.   const unsigned long  STATE_MULTISELECTABLE    = 0x01000000;  // Supports multiple selection
  282.   const unsigned long  STATE_EXTSELECTABLE      = 0x02000000;  // Supports extended selection
  283.   const unsigned long  STATE_ALERT_LOW          = 0x04000000;  // This information is of low priority
  284.   const unsigned long  STATE_ALERT_MEDIUM       = 0x08000000;  // This information is of medium priority
  285.   const unsigned long  STATE_ALERT_HIGH         = 0x10000000;  // This information is of high priority
  286.   const unsigned long  STATE_PROTECTED          = 0x20000000;  // Maps to Gnome's *Role* ATK_ROLE_PASSWD_TEXT, nothing for Java?
  287.   const unsigned long  STATE_HASPOPUP           = 0x40000000;  // New in MSAA 2.0
  288.  
  289.   // Mapping important states that we don't have to unused alert states on MSAA
  290.   // as per discussions with AT vendors. On ATK there will be legitimate states for
  291.   // STATE_REQUIRED AND STATE_INVALID
  292.   const unsigned long  STATE_REQUIRED           = STATE_ALERT_LOW;
  293.   const unsigned long  STATE_IMPORTANT          = STATE_ALERT_MEDIUM;
  294.   const unsigned long  STATE_INVALID            = STATE_ALERT_HIGH;
  295.   const unsigned long  STATE_CHECKABLE          = STATE_MARQUEED;
  296.  
  297. /**
  298.  * Extended state flags (for now non-MSAA, for Java and Gnome/ATK support)
  299.  * "Extended state flags" has seperate value space from "MSAA State flags".
  300.  */
  301.   const unsigned long  EXT_STATE_EDITABLE       = 0x00200000;  // Used for XUL/HTML input (type = text,password) element
  302.   const unsigned long  EXT_STATE_ACTIVE         = 0x00400000;  // This window is currently the active window    
  303.   const unsigned long  EXT_STATE_EXPANDABLE     = 0x00800000;  // An item that can be expanded, such as a tree item with children    
  304.   const unsigned long  EXT_STATE_MODAL          = 0x01000000;  // Must do something with control before leaving it    
  305.   const unsigned long  EXT_STATE_MULTI_LINE     = 0x02000000;  // Edit control that can take multiple lines    
  306.   const unsigned long  EXT_STATE_SENSITIVE      = 0x04000000;  // No explanation given    
  307.   const unsigned long  EXT_STATE_SHOWING        = 0x10000000;  // This object and all of it's ancestors are visible    
  308.   const unsigned long  EXT_STATE_SINGLE_LINE    = 0x20000000;  // This text object can only contain 1 line of text    
  309.   const unsigned long  EXT_STATE_TRANSIENT      = 0x40000000;  // Tells accessibility aid "Don't add event listener - this object doesn't generate any". For example, could be used with higher level containers.    
  310.   const unsigned long  EXT_STATE_VERTICAL       = 0x80000000;  // Especially used for sliders and scrollbars  
  311.  
  312. /**
  313.  * Relation Types -- most of these come from ATK's atkrelationtype.h
  314.  * RELATION_NULL:
  315.  * RELATION_CONTROLLED_BY:    Controlled by one or more target objects.
  316.  * RELATION_CONTROLLER_FOR:   Controller for one or more target objects.
  317.  * RELATION_LABEL_FOR:        Label for one or more target objects.
  318.  * RELATION_LABELLED_BY:      Labelled by one or more target objects.
  319.  * RELATION_MEMBER_OF:        Member of a group of one or more target objects.
  320.  * RELATION_NODE_CHILD_OF:    Cell in a treetable which is displayed because a
  321.  *                            cell in the same col is expanded & identifies it.
  322.  * RELATION_FLOWS_TO:         Has content that flows logically to another
  323.  *                            object in a sequential way, e.g. text flow.
  324.  * RELATION_FLOWS_FROM:       Has content that flows logically from another
  325.  *                            object in a sequential way, e.g. text flow.
  326.  * RELATION_SUBWINDOW_OF:     Subwindow attached to a component but otherwise 
  327.  *                            not connected in the UI hierarchy to that component.
  328.  * RELATION_EMBEDS:           Visually embeds another object's content, i.e.
  329.  *                            this object's content flows around another's content.
  330.  * RELATION_EMBEDDED_BY:      Inverse of RELATION_EMBEDS; this object's content
  331.  *                            is visually embedded in another object.
  332.  * RELATION_POPUP_FOR:        Popup for another object.
  333.  * RELATION_PARENT_WINDOW_OF: Parent window of another object.
  334.  * RELATION_DEFAULT_BUTTON:   Part of a form/dialog with a related default button.
  335.  * RELATION_DESCRIBED_BY:     Described by one or more target objects.
  336.  * RELATION_DESCRIPTION_FOR:  Description for one or more target objects.
  337.  * RELATION_LAST_DEFINED:
  338.  */
  339.  
  340.   const unsigned long RELATION_NUL = 0x00;               // ATK_RELATION_NUL
  341.   const unsigned long RELATION_CONTROLLED_BY = 0x01;     // ATK_RELATION_CONTROLLED_BY
  342.   const unsigned long RELATION_CONTROLLER_FOR = 0x02;    // ATK_RELATION_CONTROLLER_FOR
  343.   const unsigned long RELATION_LABEL_FOR = 0x03;         // ATK_RELATION_LABEL_FOR
  344.   const unsigned long RELATION_LABELLED_BY = 0x04;       // ATK_RELATION_LABELLED_BY
  345.   const unsigned long RELATION_MEMBER_OF = 0x05;         // ATK_RELATION_MEMBER_OF
  346.   const unsigned long RELATION_NODE_CHILD_OF = 0x06;     // ATK_RELATION_NODE_CHILD_OF
  347.   const unsigned long RELATION_FLOWS_TO = 0x07;          // ATK_RELATION_FLOWS_TO
  348.   const unsigned long RELATION_FLOWS_FROM = 0x08;        // ATK_RELATION_FLOWS_FROM
  349.   const unsigned long RELATION_SUBWINDOW_OF = 0x09;      // ATK_RELATION_SUBWINDOW_OF
  350.   const unsigned long RELATION_EMBEDS = 0x0a;            // ATK_RELATION_EMBEDS
  351.   const unsigned long RELATION_EMBEDDED_BY = 0x0b;       // ATK_RELATION_EMBEDDED_BY
  352.   const unsigned long RELATION_POPUP_FOR = 0x0c;         // ATK_RELATION_POPUP_FOR
  353.   const unsigned long RELATION_PARENT_WINDOW_OF = 0x0d;  // ATK_RELATION_PARENT_WINDOW_OF
  354.   const unsigned long RELATION_DEFAULT_BUTTON = 0x4000;  // MSAA only, no ATK relation
  355.   const unsigned long RELATION_DESCRIBED_BY = 0x4001;    // MSAA only, no ATK relation
  356.   const unsigned long RELATION_DESCRIPTION_FOR = 0x4002; // MSAA only, no ATK relation
  357.  
  358. %{C++
  359. #ifdef MOZ_ACCESSIBILITY_ATK
  360.  
  361.   enum { RELATION_LAST_DEFINED = 14U };
  362.  
  363. /**
  364.  * The following nsIAccessible roles are translated to ATK_ROLE_UNKNOWN
  365.  * 
  366.  *  ROLE_TITLEBAR, ROLE_SOUND, ROLE_CURSOR, ROLE_CARET, ROLE_BORDER,
  367.  *  ROLE_GROUPING, ROLE_EQUATION, ROLE_COLUMN, ROLE_ROW, ROLE_LINK,
  368.  *  ROLE_WHITESPACE, ROLE_CLOCK, ROLE_IPADDRESS, ROLE_NOTHING
  369.  *
  370.  *  ROLE_GRIP
  371.  *    The object represents a special mouse pointer, which allows a user to
  372.  *    manipulate user interface elements such as windows.
  373.  *
  374.  *  ROLE_HELPBALLOON
  375.  *    The object displays a Help topic in the form of a ToolTip or Help balloon.
  376.  *
  377.  *  ROLE_PROPERTYPAGE
  378.  *    The object represents a property sheet.
  379.  *
  380.  *  ROLE_INDICATOR
  381.  *    The object represents an indicator, such as a pointer graphic pointing to
  382.  *    the current item.
  383.  *
  384.  *  ROLE_HOTKEYFIELD
  385.  *    The object represents a hot-key field that allow the user to enter a
  386.  *    sequence of keystroke.
  387.  *
  388.  * The following ATK roles have no corresponding nsIAccessible roles. Perhaps
  389.  * there are not these types of widget/control in Mozilla, so don't need these
  390.  * ATK roles? Or need add some of them?
  391.  *
  392.  *   ATK_ROLE_ARROW
  393.  *     An arrow in one of the four cardinal directions.
  394.  *
  395.  *   ATK_ROLE_INTERNAL_FRAME
  396.  *     A frame-like object that is clipped by a desktop pane.
  397.  * 
  398.  *  ATK_ROLE_ACCEL_LABEL, ATK_ROLE_CANVAS, ATK_ROLE_CHECK_MENU_ITEM,
  399.  *   ATK_ROLE_COLOR_CHOOSER, ATK_ROLE_DATE_EDITOR, ATK_ROLE_DESKTOP_ICON,
  400.  *   ATK_ROLE_DESKTOP_FRAME, ATK_ROLE_DIRECTORY_PANE, ATK_ROLE_FILE_CHOOSER,
  401.  *   ATK_ROLE_FILLER, ATK_ROLE_FONT_CHOOSER, ATK_ROLE_GLASS_PANE,
  402.  *  ATK_ROLE_HTML_CONTAINER, ATK_ROLE_ICON, ATK_ROLE_LAYERED_PANE,
  403.  *   ATK_ROLE_POPUP_MENU, ATK_ROLE_OPTION_PANE, ATK_ROLE_PASSWORD_TEXT,
  404.  *  ATK_ROLE_RADIO_MENU_ITEM, ATK_ROLE_ROOT_PANE, ATK_ROLE_SCROLL_PANE,
  405.  *  ATK_ROLE_SPLIT_PANE, ATK_ROLE_TEAR_OFF_MENU_ITEM, ATK_ROLE_TERMINAL,
  406.  *  ATK_ROLE_TOGGLE_BUTTON, ATK_ROLE_TREE_TABLE, ATK_ROLE_VIEWPORT, ATK_ROLE_LABEL
  407.  *
  408.  * Important:
  409.  * Following value should keep synchronization with the definitions in atk.h
  410.  */
  411.   enum { ROLE_TITLEBAR = 66U };    // ATK_ROLE_UNKNOWN
  412.   enum { ROLE_MENUBAR = 33U };     // ATK_ROLE_MENU_BAR
  413.   enum { ROLE_SCROLLBAR = 47U };   // ATK_ROLE_SCROLL_BAR
  414.   enum { ROLE_GRIP = 66U };        // ATK_ROLE_UNKNOWN
  415.   enum { ROLE_SOUND = 66U };       // ATK_ROLE_UNKNOWN
  416.   enum { ROLE_CURSOR = 66U };      // ATK_ROLE_UNKNOWN
  417.   enum { ROLE_CARET = 66U };       // ATK_ROLE_UNKNOWN
  418.   enum { ROLE_ALERT = 2U };        // ATK_ROLE_ALERT
  419.   enum { ROLE_WINDOW = 68U };      // ATK_ROLE_WINDOW
  420.   // An object used for drawing custom user interface elements
  421.   enum { ROLE_CLIENT = 18U };      // ATK_ROLE_DRAWING_AREA
  422.   enum { ROLE_MENUPOPUP = 32U };   // ATK_ROLE_MENU
  423.   enum { ROLE_MENUITEM = 34U };    // ATK_ROLE_MENU_ITEM
  424.   enum { ROLE_TOOLTIP = 63U };     // ATK_ROLE_TOOL_TIP
  425.   // The object represents a main window for a application
  426.   enum { ROLE_APPLICATION = 73U }; // ATK_ROLE_APPLICATION
  427.   // The object represents a document window, only for MDI windows
  428.   enum { ROLE_DOCUMENT = 68U };    // ATK_ROLE_WINDOW
  429.   enum { ROLE_PANE = 38U };        // ATK_ROLE_PANEL
  430.   enum { ROLE_CHART = 26U };       // ATK_ROLE_IMAGE
  431.   enum { ROLE_DIALOG = 16U };      // ATK_ROLE_DIALOG
  432.   enum { ROLE_BORDER = 66U };      // ATK_ROLE_UNKNOWN
  433.   enum { ROLE_GROUPING = 38U };    // ATK_ROLE_PANEL
  434.   enum { ROLE_SEPARATOR = 49U };   // ATK_ROLE_SEPARATOR
  435.   enum { ROLE_TOOLBAR = 62U };     // ATK_ROLE_TOOL_BAR
  436.   enum { ROLE_STATUSBAR = 53U };   // ATK_ROLE_STATUSBAR
  437.   enum { ROLE_TABLE = 54U };       // ATK_ROLE_TABLE
  438.   // Or ATK_ROLE_TABLE_COLUMN_HEADER?
  439.   enum { ROLE_COLUMNHEADER = 10U };// ATK_ROLE_COLUMN_HEADER
  440.   // Or ATK_ROLE_TABLE_ROW_HEADER ?
  441.   enum { ROLE_ROWHEADER = 46U };   // ATK_ROLE_ROW_HEADER
  442.   enum { ROLE_COLUMN = 66U };      // ATK_ROLE_UNKNOWN
  443.   enum { ROLE_ROW = 66U };         // ATK_ROLE_UNKNOWN
  444.   enum { ROLE_CELL = 55U };        // ATK_ROLE_TABLE_CELL
  445.   enum { ROLE_LINK = 101U };        // ATK doesn't have such role now
  446.   enum { ROLE_HELPBALLOON = 66U }; // ATK_ROLE_UNKNOWN
  447.   // The object represents a cartoon-like graphic object
  448.   enum { ROLE_CHARACTER = 26U };   // ATK_ROLE_IMAGE
  449.   enum { ROLE_LIST = 30U };        // ATK_ROLE_LIST
  450.   enum { ROLE_LISTITEM = 31U };    // ATK_ROLE_LIST_ITEM
  451.   // The object represents an outline or tree structure
  452.   enum { ROLE_OUTLINE = 64U };     // ATK_ROLE_TREE
  453.   // The object represents an item in an outline or tree structure
  454.   enum { ROLE_OUTLINEITEM = 31U }; // ATK_ROLE_LIST_ITEM
  455.   enum { ROLE_PAGETAB = 36U };     // ATK_ROLE_PAGE_TAB
  456.   enum { ROLE_PROPERTYPAGE = 66U };// ATK_ROLE_UNKNOWN
  457.   enum { ROLE_INDICATOR = 66U };   // ATK_ROLE_UNKNOWN
  458.   enum { ROLE_GRAPHIC = 26U };     // ATK_ROLE_IMAGE
  459.   // Read-only text, can't be modified or selected
  460.   enum { ROLE_STATICTEXT = 60U };  // ATK_ROLE_TEXT
  461.   enum { ROLE_TEXT = 60U };        // ATK_ROLE_TEXT
  462.   enum { ROLE_PUSHBUTTON = 42U };  // ATK_ROLE_PUSH_BUTTON
  463.   enum { ROLE_CHECKBUTTON = 7U };  // ATK_ROLE_CHECK_BOX
  464.   enum { ROLE_RADIOBUTTON = 43U }; // ATK_ROLE_RADIO_BUTTON
  465.   enum { ROLE_COMBOBOX = 11U };    // ATK_ROLE_COMBO_BOX
  466.   // Just represents the calender control
  467.   enum { ROLE_DROPLIST = 5U };     // ATK_ROLE_CALENDAR
  468.   enum { ROLE_PROGRESSBAR = 41U }; // ATK_ROLE_PROGRESS_BAR
  469.   enum { ROLE_DIAL = 15U };        // ATK_ROLE_DIAL
  470.   enum { ROLE_HOTKEYFIELD = 66U }; // ATK_ROLE_UNKNOWN
  471.   enum { ROLE_SLIDER = 50U };      // ATK_ROLE_SLIDER
  472.   enum { ROLE_SPINBUTTON = 52U };  // ATK_ROLE_SPIN_BUTTON
  473.   enum { ROLE_DIAGRAM = 26U };     // ATK_ROLE_IMAGE
  474.   enum { ROLE_ANIMATION = 3U };    // ATK_ROLE_ANIMATION
  475.   enum { ROLE_EQUATION = 66U };    // ATK_ROLE_UNKNOWN
  476.   enum { ROLE_BUTTONDROPDOWN = 42U }; // ATK_ROLE_PUSH_BUTTON
  477.   enum { ROLE_BUTTONMENU = 42U };  // ATK_ROLE_PUSH_BUTTON
  478.   // Represents a button that drops down a grid
  479.   enum { ROLE_BUTTONDROPDOWNGRID = 66U }; // ATK_ROLE_UNKNOWN
  480.   enum { ROLE_WHITESPACE = 66U };  // ATK_ROLE_UNKNOWN
  481.   enum { ROLE_PAGETABLIST = 37U }; // ATK_ROLE_PAGE_TAB_LIST
  482.   enum { ROLE_CLOCK = 66U };       // ATK_ROLE_UNKNOWN
  483.   // Represents a button on the toolbar that has a drop-down list icon
  484.   // directly adjacent to the button
  485.   enum { ROLE_SPLITBUTTON = 42U }; // ATK_ROLE_PUSH_BUTTON
  486.   enum { ROLE_IPADDRESS = 66U };   // ATK_ROLE_UNKNOWN
  487.   enum { ROLE_NOTHING = 66U };     // ATK_ROLE_UNKNOWN
  488.   // Represent top level window
  489.   enum { ROLE_FRAME = 22U };               // ATK_ROLE_FRAME
  490.  
  491.   // Other roles from atk.h
  492.   enum { ROLE_ACCEL_LABEL = 1U };          // ATK_ROLE_ACCEL_LABEL
  493.   enum { ROLE_ARROW  = 4U };               // ATK_ROLE_ARROW
  494.   enum { ROLE_CANVAS = 6U };               // ATK_ROLE_CANVAS
  495.   enum { ROLE_CHECK_MENU_ITEM = 8U };      // ATK_ROLE_CHECK_MENU_ITEM
  496.   enum { ROLE_COLOR_CHOOSER  = 9U };       // ATK_ROLE_COLOR_CHOOSER
  497.   enum { ROLE_DATE_EDITOR = 12U };         // ATK_ROLE_DATE_EDITOR
  498.   enum { ROLE_DESKTOP_ICON = 13U };        // ATK_ROLE_DESKTOP_ICON
  499.   enum { ROLE_DESKTOP_FRAME = 14U };       // ATK_ROLE_DESKTOP_FRAME
  500.   enum { ROLE_DIRECTORY_PANE = 17U };      // ATK_ROLE_DIRECTORY_PANE
  501.   enum { ROLE_FILE_CHOOSER = 19U};         // ATK_ROLE_FILE_CHOOSER
  502.   enum { ROLE_FILLER = 20U };              // ATK_ROLE_FILLER
  503.   enum { ROLE_FONT_CHOOSER = 21U };        // ATK_ROLE_FONT_CHOOSER
  504.   enum { ROLE_GLASS_PANE = 23U };          // ATK_ROLE_GLASS_PANE
  505.   enum { ROLE_HTML_CONTAINER = 24U };      // ATK_ROLE_HTML_CONTAINER
  506.   enum { ROLE_ICON = 25U };                // ATK_ROLE_ICON
  507.   enum { ROLE_INTERNAL_FRAME = 27U };      // ATK_ROLE_INTERNAL_FRAME
  508.   enum { ROLE_LABEL = 28U };               // ATK_ROLE_LABEL
  509.   enum { ROLE_LAYERED_PANE = 29U };        // ATK_ROLE_LAYERED_PANE
  510.   enum { ROLE_OPTION_PANE = 35U };         // ATK_ROLE_OPTION_PANE
  511.   enum { ROLE_PASSWORD_TEXT = 39U };       // ATK_ROLE_PASSWORD_TEXT
  512.   enum { ROLE_POPUP_MENU = 40U };          // ATK_ROLE_POPUP_MENU
  513.   enum { ROLE_RADIO_MENU_ITEM = 44U };     // ATK_ROLE_RADIO_MENU_ITEM
  514.   enum { ROLE_ROOT_PANE = 45U };           // ATK_ROLE_ROOT_PANE
  515.   enum { ROLE_SCROLL_PANE = 48U };         // ATK_ROLE_SCROLL_PANE
  516.   enum { ROLE_SPLIT_PANE = 51U };          // ATK_ROLE_SPLIT_PANE
  517.   enum { ROLE_TABLE_COLUMN_HEADER = 56U }; // ATK_ROLE_TABLE_COLUMN_HEADER
  518.   enum { ROLE_TABLE_ROW_HEADER = 57U };    // ATK_ROLE_TABLE_ROW_HEADER
  519.   enum { ROLE_TEAR_OFF_MENU_ITEM = 58U };  // ATK_ROLE_TEAR_OFF_MENU_ITEM
  520.   enum { ROLE_TERMINAL = 59U };            // ATK_ROLE_TERMINAL
  521.   enum { ROLE_TOGGLE_BUTTON = 61U };       // ATK_ROLE_TOGGLE_BUTTON
  522.   enum { ROLE_TREE_TABLE = 65U };          // ATK_ROLE_TREE_TABLE
  523.   enum { ROLE_VIEWPORT = 67U };            // ATK_ROLE_VIEWPORT
  524.   enum { ROLE_HEADER = 69U };              // ATK_ROLE_HEADER
  525.   enum { ROLE_FOOTER = 70U };              // ATK_ROLE_FOOTER
  526.   enum { ROLE_PARAGRAPH = 71U };           // ATK_ROLE_PARAGRAPH
  527.   enum { ROLE_RULER = 72U };               // ATK_ROLE_RULER
  528.   enum { ROLE_AUTOCOMPLETE = 74U };        // ATK_ROLE_AUTOCOMPLETE
  529. #else
  530. // MSAA Roles - only one per nsIAccessible or IAccessible
  531.   enum { ROLE_TITLEBAR = 1U };
  532.   enum { ROLE_MENUBAR = 2U };
  533.   enum { ROLE_SCROLLBAR = 3U };
  534.   enum { ROLE_GRIP = 4U };
  535.   enum { ROLE_SOUND = 5U };
  536.   enum { ROLE_CURSOR = 6U };
  537.   enum { ROLE_CARET = 7U };
  538.   enum { ROLE_ALERT = 8U };
  539.   enum { ROLE_WINDOW = 9U };
  540.   enum { ROLE_CLIENT = 10U };
  541.   enum { ROLE_MENUPOPUP = 11U };
  542.   enum { ROLE_MENUITEM = 12U };
  543.   enum { ROLE_RADIO_MENU_ITEM = 12U }; // Same as ROLE_MENUITEM
  544.   enum { ROLE_CHECK_MENU_ITEM = 12U }; // Same as ROLE_MENUITEM
  545.   enum { ROLE_TOOLTIP = 13U };
  546.   enum { ROLE_APPLICATION = 14U };
  547.   enum { ROLE_DOCUMENT = 15U };
  548.   enum { ROLE_PANE = 16U };
  549.   enum { ROLE_CHART = 17U };
  550.   enum { ROLE_DIALOG = 18U };
  551.   enum { ROLE_BORDER = 19U };
  552.   enum { ROLE_GROUPING = 20U };
  553.   enum { ROLE_SEPARATOR = 21U };
  554.   enum { ROLE_TOOLBAR = 22U };
  555.   enum { ROLE_STATUSBAR = 23U };
  556.   enum { ROLE_TABLE = 24U };
  557.   enum { ROLE_COLUMNHEADER = 25U };
  558.   enum { ROLE_ROWHEADER = 26U };
  559.   enum { ROLE_COLUMN = 27U };
  560.   enum { ROLE_ROW = 28U };
  561.   enum { ROLE_CELL = 29U };
  562.   enum { ROLE_LINK = 30U };
  563.   enum { ROLE_HELPBALLOON = 31U };
  564.   enum { ROLE_CHARACTER = 32U };
  565.   enum { ROLE_LIST = 33U };
  566.   enum { ROLE_LISTITEM = 34U };
  567.   enum { ROLE_OUTLINE = 35U };
  568.   enum { ROLE_TREE_TABLE = 35U }; // Same as ROLE_OUTLINE
  569.   enum { ROLE_OUTLINEITEM = 36U };
  570.   enum { ROLE_PAGETAB = 37U };
  571.   enum { ROLE_PROPERTYPAGE = 38U };
  572.   enum { ROLE_INDICATOR = 39U };
  573.   enum { ROLE_GRAPHIC = 40U };
  574.   enum { ROLE_STATICTEXT = 41U };
  575.   enum { ROLE_TEXT = 42U };
  576.   enum { ROLE_PUSHBUTTON = 43U };
  577.   enum { ROLE_CHECKBUTTON = 44U };
  578.   enum { ROLE_RADIOBUTTON = 45U };
  579.   enum { ROLE_COMBOBOX = 46U };
  580.   enum { ROLE_DROPLIST = 47U };
  581.   enum { ROLE_PROGRESSBAR = 48U };
  582.   enum { ROLE_DIAL = 49U };
  583.   enum { ROLE_HOTKEYFIELD = 50U };
  584.   enum { ROLE_SLIDER = 51U };
  585.   enum { ROLE_SPINBUTTON = 52U };
  586.   enum { ROLE_DIAGRAM = 53U };
  587.   enum { ROLE_ANIMATION = 54U };
  588.   enum { ROLE_EQUATION = 55U };
  589.   enum { ROLE_BUTTONDROPDOWN = 56U };
  590.   enum { ROLE_BUTTONMENU = 57U };
  591.   enum { ROLE_BUTTONDROPDOWNGRID = 58U };
  592.   enum { ROLE_WHITESPACE = 59U };
  593.   enum { ROLE_PAGETABLIST = 60U };
  594.   enum { ROLE_CLOCK = 61U };
  595.   enum { ROLE_SPLITBUTTON = 62U };
  596.   enum { ROLE_IPADDRESS = 63U };
  597.   enum { ROLE_NOTHING = 4294967295U };
  598.  
  599. // Make up for ATK roles that we don't have in MSAA
  600. // When in doubt map them to ROLE_NOTHING so that the role string is exposed
  601.   enum { ROLE_ICON = ROLE_NOTHING };
  602.   enum { ROLE_PASSWORD_TEXT = ROLE_TEXT };
  603.  
  604. // MSAA relationship extensions to accNavigate
  605.   enum { NAVRELATION_CONTROLLED_BY = 0x1000 };
  606.   enum { NAVRELATION_CONTROLLER_FOR = 0x1001 };
  607.   enum { NAVRELATION_LABEL_FOR = 0x1002 };
  608.   enum { NAVRELATION_LABELLED_BY = 0x1003 };
  609.   enum { NAVRELATION_MEMBER_OF = 0x1004 };
  610.   enum { NAVRELATION_NODE_CHILD_OF = 0x1005 };
  611.   enum { NAVRELATION_FLOWS_TO = 0x1006 };
  612.   enum { NAVRELATION_FLOWS_FROM = 0x1007 };
  613.   enum { NAVRELATION_SUBWINDOW_OF = 0x1008 };
  614.   enum { NAVRELATION_EMBEDS = 0x1009 };
  615.   enum { NAVRELATION_EMBEDDED_BY = 0x100a };
  616.   enum { NAVRELATION_POPUP_FOR = 0x100b };
  617.   enum { NAVRELATION_PARENT_WINDOW_OF = 0x100c };
  618.   enum { NAVRELATION_DEFAULT_BUTTON = 0x100d };
  619.   enum { NAVRELATION_DESCRIBED_BY = 0x100e };
  620.   enum { NAVRELATION_DESCRIPTION_FOR = 0x100f };
  621.  
  622. #endif
  623. %}
  624. };
  625.